﻿using System;
using System.Globalization;
using System.Net;
using System.Windows.Data;

namespace httpExplorer.Xaml
{
    /// <summary>
    /// Description for OutputGrid.
    /// </summary>
    public partial class OutputGrid
    {
        /// <summary>
        /// Initializes a new instance of the OutputGrid class.
        /// </summary>
        public OutputGrid()
        {
            InitializeComponent();
        }
    }

    public class ResponseCodeToNumericConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
                return "-1";
            return (int)((HttpWebResponse)value).StatusCode;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            new NotImplementedException();
            return null;
        }
    }
}